<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>

	<div ng-app="myApp" ng-controller="myCtrl">

		<ul>
			<li ng-repeat="x in names">{{x}}</li>
		</ul>
		
		<p>
			<button ng-disabled="mySwitch">点我!</button>
		</p>

		<p>
			<input type="checkbox" ng-model="mySwitch">按钮
		</p>

		<p>{{ mySwitch }}</p>


	</div>

	<script>
		var app = angular.module('myApp', []);

		app.controller('myCtrl', function($scope, $rootScope, $location, $http) {
			
			$scope.names = [ "Emil", "Tobias", "Linus" ];
		
			$rootScope.name = 'sue';
			
		});
	</script>

</body>
</html>